package Service.StatisticalReport.StatisticalReportImpl;

import Model.StatisticalReport.ReportClass;
import Service.StatisticalReport.ReportService;
import Service.StatisticalReport.ReportServiceFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class ReportServiceFactoryImpl implements ReportServiceFactory {

    @Resource
    HomeDetailService homeDetailService;
//    @Resource
//    HomeSummaryService homeSummaryService;
    @Resource
    DepartmentDetailService departmentDetailService;
//    @Resource
//    DepartmentSummaryService departmentSummaryService;
    @Resource
    EvaluateDetailService evaluateDetailService;
//    @Resource
//    EvaluateSummaryService evaluateSummaryService;


    public ReportService getReportService(ReportClass reportClass){
        switch (reportClass){
            case HOME:
                return homeDetailService;
//            case HOME_SUMMARY:
//                return homeSummaryService;
            case DEPARTMENT:
                return departmentDetailService;
//            case DEPARTMENT_SUMMARY:
//                return departmentSummaryService;
            case EVALUATE:
                return evaluateDetailService;
//            case EVALUATE_SUMMARY:
//                return evaluateSummaryService;
        }
        return null;
    }
}
